<script setup>
import { artGetChannelsService } from '@/api/article'
import { defineModel } from 'vue'
const model = defineModel()
const channelList = ref([])
// 获取文章分类列表
const getChannelList = async () => {
  const res = await artGetChannelsService()
  channelList.value = res.data.data
}
onMounted(() => {
  getChannelList()
})
</script>

<template>
  <el-select style="width: 150px" v-model="model">
    <el-option
      v-for="channel in channelList"
      :key="channel.id"
      :label="channel.cate_name"
      :value="channel.id"
    ></el-option>
  </el-select>
</template>
